//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES.
//
/*++
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
Copyright (c) Microsoft Corporation. All rights reserved.

Module Name:

data.h

Abstract:


Notes:


--*/

#pragma once


#define DATA_ALLOC_NUMBER        16


//
// Connection speeds
//
static const DWORD g_rgdwConnSpeeds[] =
{
    -1,     // RIL_SPEED_UNKNOWN
    0,      // RIL_SPEED_AUTO
    1,      // RIL_SPEED_300_V21
    65,     // RIL_SPEED_300_V110
    2,      // RIL_SPEED_1200_V22
    3,      // RIL_SPEED_1200_75_V23
    66,     // RIL_SPEED_1200_V110
    34,     // RIL_SPEED_1200_V120
    4,      // RIL_SPEED_2400_V22BIS
    5,      // RIL_SPEED_2400_V26TER
    68,     // RIL_SPEED_2400_V110
    36,     // RIL_SPEED_2400_V120
    6,      // RIL_SPEED_4800_V32
    70,     // RIL_SPEED_4800_V110
    38,     // RIL_SPEED_4800_V120
    7,      // RIL_SPEED_9600_V32
    12,     // RIL_SPEED_9600_V34
    71,     // RIL_SPEED_9600_V110
    39,     // RIL_SPEED_9600_V120
    14,     // RIL_SPEED_14400_V34
    75,     // RIL_SPEED_14400_V110
    43,     // RIL_SPEED_14400_V120
    15,     // RIL_SPEED_19200_V34
    79,     // RIL_SPEED_19200_V110
    47,     // RIL_SPEED_19200_V120
    16,     // RIL_SPEED_28800_V34
    80,     // RIL_SPEED_28800_V110
    48,     // RIL_SPEED_28800_V120
    81,     // RIL_SPEED_38400_V110
    49,     // RIL_SPEED_38400_V120
    82,     // RIL_SPEED_48000_V110
    50,     // RIL_SPEED_48000_V120
    83,     // RIL_SPEED_56000_V110
    51,     // RIL_SPEED_56000_V120
    115,    // RIL_SPEED_56000_TRANSP
    116,    // RIL_SPEED_64000_TRANSP
    120,    // RIL_SPEED_32000_PIAFS32K
    121,    // RIL_SPEED_64000_PIAFS64K
    130,    // RIL_SPEED_28800_MULTIMEDIA
    131,    // RIL_SPEED_32000_MULTIMEDIA
    132,    // RIL_SPEED_33600_MULTIMEDIA
    133,    // RIL_SPEED_56000_MULTIMEDIA
    134,    // RIL_SPEED_64000_MULTIMEDIA
};
#define NUM_CONNSPEEDS      (sizeof(g_rgdwConnSpeeds) / sizeof(DWORD))


//
// HSCSD channel codings
//
static const DWORD g_rgdwHSCSDCodings[] =
{
    RIL_HSCSDCODING_4800_FULLRATE,      // 1 = 2^0
    0,                                  // 2 = 2^1
    RIL_HSCSDCODING_9600_FULLRATE,      // 4 = 2^2
    RIL_HSCSDCODING_14400_FULLRATE,     // 8 = 2^3
};
#define NUM_HSCSDCODINGS    (sizeof(g_rgdwHSCSDCodings) / sizeof(DWORD))


//
// HSCSD air interface user rates
//
static const DWORD g_rgdwHSCSDAirRates[] =
{
    0,      // RIL_HSCSDAIURATE_UNKNOWN
    1,      // RIL_HSCSDAIURATE_9600
    2,      // RIL_HSCSDAIURATE_14400
    3,      // RIL_HSCSDAIURATE_19200
    4,      // RIL_HSCSDAIURATE_28800
    5,      // RIL_HSCSDAIURATE_38400
    6,      // RIL_HSCSDAIURATE_43200
    7,      // RIL_HSCSDAIURATE_57600
};
#define NUM_HSCSDAIRRATES   (sizeof(g_rgdwHSCSDAirRates) / sizeof(DWORD))



HRESULT RILDrv_GetHSCSDOptions(DWORD dwParam);
HRESULT RILDrv_SetHSCSDOptions(DWORD dwParam, const RILHSCSDINFO* lpHscsdInfo);
HRESULT RILDrv_GetHSCSDCallSettings(DWORD dwParam);
HRESULT RILDrv_GetBearerServiceOptions(DWORD dwParam);
HRESULT RILDrv_SetBearerServiceOptions(DWORD dwParam, const RILBEARERSVCINFO* lpBearerServiceInfo);
HRESULT RILDrv_GetRLPOptions(DWORD dwParam);
HRESULT RILDrv_SetRLPOptions(DWORD dwParam, const RILRLPINFO* lpRlpInfo);
HRESULT RILDrv_GetDataCompression (DWORD dwParam);
HRESULT RILDrv_SetDataCompression (DWORD dwParam, const RILDATACOMPINFO* lpDataCompInfo);
HRESULT RILDrv_GetErrorCorrection (DWORD dwParam);
HRESULT RILDrv_SetErrorCorrection (DWORD dwParam, const RILERRORCORRECTIONINFO* lpErrorCorrectionInfo);

HRESULT RILDrv_GetPacketByteCount(DWORD dwParam);
HRESULT RILDrv_ResetPacketByteCount(DWORD dwParam);

HRESULT ParseGetDevCapsDataCompression(LPCSTR szRsp, void*& pBlob, UINT& cbBlob);
HRESULT ParseGetDevCapsErrorCorrection(LPCSTR szRsp, void*& pBlob, UINT& cbBlob);
HRESULT RILDrv_SetATLogging(DWORD dwParam, BOOL fEnable);
HRESULT RILDrv_ATLogFile(DWORD dwParam, LPTSTR pszFilename);
HRESULT RILDrv_GetSerialPortHandleFromContextID(DWORD dwContextID, TCHAR *tszDataPortName, DWORD dwSize, DWORD *pdwSizeOut);
HRESULT RILDrv_GetVTSerialPortHandle(TCHAR *tszVTPortName, DWORD dwSize, DWORD *pdwSizeOut);

